package com.example.javabasic.thread.classtwo.threadlocal.demo3;



public class ExecutionTask implements Runnable {

    private QueryAction queryAction = new QueryAction();
    private CardAction cardAction = new CardAction();
    @Override
    public void run() {
        Context context = ActionContext.getInstance().getContext();
        queryAction.execute();
        System.out.println("query查询成功");
        cardAction.execute();
        System.out.println("http查询成功");
        System.out.println(Thread.currentThread().getName()+ " cardid  is->"+context.getCardId());
        System.out.println(Thread.currentThread().getName()+" name  is->"+context.getName());

    }
}
